﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VIFON.DAL
{
    public class DAUser
    {
        internal bool CheckLogin(string username, string password)
        {
            try
            {
                using (var db = new DBVIFONDataContext())
                {
                    var temp = db.Users.FirstOrDefault(user => user.UserName == username && user.Password == password);
                    if (temp == null)
                        return false;
                    else
                        return true;
                }
            }
            catch
            { return false; }
        }
    }
}
